home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Portable Patmos / usr / include / rpcsvc / rstat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-08  |  1.8 KB  |  94 lines  |  [TEXT/R*ch]

  1. #ifndef FSCALE
  2. /*
  3.  * Scale factor for scaled integers used to count load averages.
  4.  */
  5. #define FSHIFT  8               /* bits to right of fixed binary point */
  6. #define FSCALE  (1<<FSHIFT)
  7.  
  8. #endif /* ndef FSCALE */
  9. #define CPUSTATES 4
  10. #define DK_NDRIVE 4
  11.  
  12. struct rstat_timeval {
  13.     u_int tv_sec;
  14.     u_int tv_usec;
  15. };
  16. typedef struct rstat_timeval rstat_timeval;
  17. bool_t xdr_rstat_timeval();
  18.  
  19.  
  20. struct statstime {
  21.     int cp_time[CPUSTATES];
  22.     int dk_xfer[DK_NDRIVE];
  23.     u_int v_pgpgin;
  24.     u_int v_pgpgout;
  25.     u_int v_pswpin;
  26.     u_int v_pswpout;
  27.     u_int v_intr;
  28.     int if_ipackets;
  29.     int if_ierrors;
  30.     int if_oerrors;
  31.     int if_collisions;
  32.     u_int v_swtch;
  33.     int avenrun[3];
  34.     rstat_timeval boottime;
  35.     rstat_timeval curtime;
  36.     int if_opackets;
  37. };
  38. typedef struct statstime statstime;
  39. bool_t xdr_statstime();
  40.  
  41.  
  42. struct statsswtch {
  43.     int cp_time[CPUSTATES];
  44.     int dk_xfer[DK_NDRIVE];
  45.     u_int v_pgpgin;
  46.     u_int v_pgpgout;
  47.     u_int v_pswpin;
  48.     u_int v_pswpout;
  49.     u_int v_intr;
  50.     int if_ipackets;
  51.     int if_ierrors;
  52.     int if_oerrors;
  53.     int if_collisions;
  54.     u_int v_swtch;
  55.     u_int avenrun[3];
  56.     rstat_timeval boottime;
  57.     int if_opackets;
  58. };
  59. typedef struct statsswtch statsswtch;
  60. bool_t xdr_statsswtch();
  61.  
  62.  
  63. struct stats {
  64.     int cp_time[CPUSTATES];
  65.     int dk_xfer[DK_NDRIVE];
  66.     u_int v_pgpgin;
  67.     u_int v_pgpgout;
  68.     u_int v_pswpin;
  69.     u_int v_pswpout;
  70.     u_int v_intr;
  71.     int if_ipackets;
  72.     int if_ierrors;
  73.     int if_oerrors;
  74.     int if_collisions;
  75.     int if_opackets;
  76. };
  77. typedef struct stats stats;
  78. bool_t xdr_stats();
  79.  
  80.  
  81. #define RSTATPROG ((u_long)100001)
  82. #define RSTATVERS_TIME ((u_long)3)
  83. #define RSTATPROC_STATS ((u_long)1)
  84. extern statstime *rstatproc_stats_3();
  85. #define RSTATPROC_HAVEDISK ((u_long)2)
  86. extern u_int *rstatproc_havedisk_3();
  87. #define RSTATVERS_SWTCH ((u_long)2)
  88. extern statsswtch *rstatproc_stats_2();
  89. extern u_int *rstatproc_havedisk_2();
  90. #define RSTATVERS_ORIG ((u_long)1)
  91. extern stats *rstatproc_stats_1();
  92. extern u_int *rstatproc_havedisk_1();
  93.  
  94.